{include file="library/header.tpl"}
<body style="background:#deecef; overflow-x:hidden;">
<!-- {if $mm_show eq "MySuggest"} -->
<div>
<h3>我提交的建议</h3>
<hr>
<!-- {if $suggest} -->
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <td>
    <table border="0" cellspacing="1" cellpadding="0" width="85%" bgcolor="#CCCCCC" align="center">
  <tr bgcolor="#0099FF">
    <th>编号</th>
    <th>建议内容</th>
    <th>提出时间</th>
    <th>评分</th>
    <th>是否审核</th>
    <th>是否实施</th>
  </tr>
  <!--{foreach from=$suggest item=s}-->
  <tr bgcolor="#FFFFFF">
    <td align="center">{$s.id}</td>
    <td align="center">{$s.s_content}</td>
    <td align="center">{$s.s_date}</td>
    <td align="center">{$s.score}</td>
    <td align="center">{if $s.s_isverify} <font color="#00FF00">已审核</font> {else} <font color="#FF0000">未审核</font> {/if}</td>
    <td align="center">
    <!--{if $s.s_isimplementation eq 0} --> <font color="#FF0000">不实施</font> 
    <!--{elseif $s.s_isimplementation eq 1} --> 待实施 
    <!--{elseif $s.s_isimplementation eq 2} --> <font color="#00FF00">已实施</font>
    <!--{/if} --></td>
  </tr>
  <!--{/foreach}-->
</table>

    </td>
  </tr>

</table>
<!-- {else} -->
  <table border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>没有数据</td>
  </tr>
</table>
<!-- {/if} -->
</div>
<!-- {/if} -->
<!-- {if $mm_show eq "AddSuggest"} -->
<div>
<h3>提交建议</h3>
<hr>
<form action="" method="post" name="addSuggest" id="addSuggest" enctype="multipart/form-data">
<table border="0" cellspacing="3" cellpadding="0" align="center">
  <tr>
    <td valign="top">建议内容：</td>
    <td>
    <textarea rows="8" cols="50" name="content" id="content"></textarea>
    </td>
  </tr>
  <tr>
    <td>建议审核表：</td>
    <td><input type="file" name="sugfile" id="sugfile" />
    &nbsp;&nbsp; <font color="#FF0000" size="-1">* 文件名为字母和数字组合，不能使用汉字</font></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="35" align="left" valign="bottom">
    <input type="hidden" name="act" value="update" />
    <input type="submit" class="mm-button mm-button-submit" value="提交" />
    <input type="reset" class="mm-button mm-button-submit" value="重置" />
    </td>
  </tr>
</table>

</form>
</div>
<!-- {/if} -->
<!-- {if $mm_show eq "PicSuggest"} -->
<div>
<script src="js/highcharts.js"></script>
<script src="js/exporting.js"></script>
<script type="text/javascript">
$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'bar'
            },
            title: {
                text: '建议统计'
            },
            subtitle: {
                text: '来自: www.mingmailtd.com'
            },
            xAxis: {
                categories: {$username},
                title: {
                    text: null
                }
            },
            yAxis: {
                min: 0,
                title: {
                    text: '得分 (分)',
                    align: 'high'
                }
            },
            tooltip: {
                formatter: function() {
                    return ''+
                        this.series.name +': '+ this.y +' 分';
                }
            },
            plotOptions: {
                bar: {
                    dataLabels: {
                        enabled: true
                    }
                }
            },
            legend: {
                layout: 'vertical',
                align: 'right',
                verticalAlign: 'top',
                x: -100,
                y: 100,
                floating: true,
                borderWidth: 1,
                backgroundColor: '#FFFFFF',
                shadow: true
            },
            credits: {
                enabled: false
            },
            series: [{
                name: '建议得分',
                data: [{$score}]
            }]
        });
    });
    
});
		</script>

<!-- {if $priv } -->
<!-- {if $personpic } -->
<div>
<table border="0" cellspacing="0" cellpadding="0" width="650" align="center">
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
  <td align="left">
    <link rel="stylesheet" href="http://code.jquery.com/ui/1.8.21/themes/base/jquery-ui.css" type="text/css" media="all" />
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
 
  <script>
  $(document).ready(function() {
	$("#start_date").datepicker();
	$( "#start_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
	
	$("#end_date").datepicker();
	$( "#end_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
  });
  </script>
    <form action="suggest.php?act=pic" method="post" name="dateSelect">
    <table border="0" cellspacing="3" cellpadding="0">
  <tr>
    <td>开始日期：</td>
    <td align="left"><input type="text" id="start_date" name="start_date" /></td>
    <td>结束日期：</td>
    <td align="left"><input type="text" id="end_date" name="end_date" /></td>
    <td><input type="submit" value="搜索" /></td>
  </tr>
</table>

    </form>
    </td>
    <td align="right"><a href="suggest.php?act=pic&showall=true">查看所有人得分</a></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>  
</div>
<!-- {/if} -->
<!-- {/if} -->
<!-- {if $allpic } -->
<div>
<table border="0" cellspacing="0" cellpadding="0" width="650" align="center">
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
  <tr>
  <td align="left">
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.8.21/themes/base/jquery-ui.css" type="text/css" media="all" />
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
 
  <script>
  $(document).ready(function() {
	$("#start_date").datepicker();
	$( "#start_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
	
	$("#end_date").datepicker();
	$( "#end_date" ).datepicker( "option", "dateFormat", "yy-mm-dd" );
  });
  </script>
    <form action="suggest.php?act=pic&showall=true" method="post" name="dateSelect">
    <table border="0" cellspacing="3" cellpadding="0">
  <tr>
    <td>开始日期：</td>
    <td align="left"><input type="text" id="start_date" name="start_date" /></td>
    <td>结束日期：</td>
    <td align="left"><input type="text" id="end_date" name="end_date" /></td>
    <td><input type="submit" value="搜索" /></td>
  </tr>
</table>

    </form>
    </td>
    <td align="right"><a href="suggest.php?act=pic">查看自己得分</a></td>
  </tr>
  <tr>
    <td colspan="2">&nbsp;</td>
  </tr>
</table>
</div>
<!-- {/if} -->

<div id="container" style="min-width: 400px; max-width:600px; height: 400px; margin: 0 auto"></div>
</div>
<!-- {/if} -->
<!-- {if $mm_show eq "auditSuggest"} -->
<div>
<h3>所有建议</h3>
<hr>
<!-- {if $suggest} -->
    <table border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <td>
    <table border="0" cellspacing="1" cellpadding="0" width="85%" bgcolor="#CCCCCC" align="center">
  <tr bgcolor="#0099FF">
    <th>编号</th>
    <th>建议内容</th>
    <th>提出者</th>
    <th>提出时间</th>
    <th>可实施性打分</th>
    <th>创意打分</th>
    <th>效果打分</th>
    <th>是否审核</th>
    <th>是否实施</th>
    <th>是否开发</th>
    <th>相关文档</th>
    <th>操作</th>
  </tr>
  <!--{foreach from=$suggest item=s}-->
  <tr bgcolor="#FFFFFF">
    <td align="center">{$s.id}</td>
    <td align="center">{$s.s_content}</td>
    <td align="center">{$s.employee}</td>
    <td align="center">{$s.s_date}</td>
    <td align="center">{$s.s_actionability}</td>
    <td align="center">{$s.s_innovate}</td>
    <td align="center">{$s.s_effect}</td>
    <td align="center">{if $s.s_isverify} <font color="#00FF00">已审核</font> {else} <font color="#FF0000">未审核</font> {/if}</td>
    
    <td align="center">
    <!--{if $s.s_isimplementation eq 0} --> <font color="#FF0000">不实施</font> 
    <!--{elseif $s.s_isimplementation eq 1} --> 待实施 
    <!--{elseif $s.s_isimplementation eq 2} --> <font color="#00FF00">已实施</font>
    <!--{/if} -->
    </td>
    <td align="center">{if $s.s_devno} <font color="#00FF00">{$s.s_devno}</font> {else} <font color="#FF0000">未开发</font> {/if}</td>
    <td align="center">
      <!--{if $s.s_file} -->
      <a href="{$s.s_file}">下载</a>
      <!--{else} --> 无
      <!--{/if} -->
      
     </td>
    <td>
     {if $s.s_isverify} 已审核 {else}
     <a href="suggest.php?act=modaudit&sid={$s.id}">打分</a>{/if} / 
     <a href="suggest.php?act=del&sid={$s.id}">删除</a>
    </td>
  </tr>
  <!--{/foreach}-->
</table>

    </td>
  </tr>

</table>
<!-- {else} -->
  <table border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>没有数据</td>
  </tr>
</table>
<!-- {/if} -->
</div>
<!-- {/if} -->
<!-- {if $mm_show eq "modaudit"} -->
<div>
<h3>建议打分</h3>
<hr>
<!-- {if $suggest} -->
<form action="suggest.php" method="post" id="modaudit">
<table border="0" cellspacing="5" cellpadding="0" align="left">
  <tr>
    <td>建议内容：</td>
    <td>{$suggest.s_content}</td>
  </tr>
  <tr>
    <td>建议日期：</td>
    <td>{$suggest.s_date}</td>
  </tr>
  <tr>
    <td>可实施性打分：</td>
    <td><select name="actionability" style="width:50px;">
    <option value="0">0</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select></td>
  </tr>
  <tr>
    <td>创意打分：</td>
    <td><select name="innovate" style="width:50px;">
    <option value="0">0</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    </select></td>
  </tr>
  <tr>
    <td>效果打分：</td>
    <td><select name="effect" style="width:50px;">
    <option value="0">0</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    </select></td>
  </tr>
  <tr>
    <td>是否实施：</td>
    <td>
    <select name="implementation" style="width:80px;">
    <option value="0">不实施</option>
    <option value="1">待实施</option>
    <option value="2">已实施</option>
    </select>
    </td>
  </tr>
  <tr>
    <td>开发编号：</td>
    <td><input name="devlop" type="text" size="15" maxlength="20"></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
    <input type="hidden" name="act" value="modauditu" />
    <input type="hidden" name="sid" value="{$suggest.id}" />
    <input name="submit"  class="mm-button mm-button-submit" type="submit" value="提交">
    </td>
  </tr>
</table>

</form>

<!-- {/if} -->
</div>
<!-- {/if} -->
</body>
{include file="library/footer.tpl"}